#include <stdio.h>
 
int main(void)
{
	int i, j, m, max, maxi, maxj;
	int array[20][20];
 
	printf("Please input m:");
	scanf("%d", &m);
 
	printf("\nPlease input array:\n");
	for (i = 0; i < m; i++)
	{
		for (j = 0; j < m; j++)
		{
			scanf("%d", &array[i][j]);
		}
	}
 
	max = array[0][0];
maxi=0;maxj=0;
	for (i = 0; i < m; i++)
	{
		for (j = 0; j < m; j++)
		{
			if (max < array[i][j])
			{
				max = array[i][j];
				maxi = i;
				maxj = j;
			}
		}
	}
	printf("Output:");
	printf("\nmax=%d,i=%d,j=%d\n", max, maxi, maxj);
	return 0;
}

